#ifndef __KERNEL_KSTDIO_H_
#define __KERNEL_KSTDIO_H_

#include "typedef.h"

typedef struct SysBuffer
{
    char *buff;
    int  size;
    int ptr;
    runable full_handle;
    runable empty_handle;
} *SysBuffer;


void flush_buffer(SysBuffer sbf);
boolean putc_buffer(SysBuffer sbf, char c);
char getc_buffer(SysBuffer sbf);

int write_buffer(SysBuffer sbf, const char *buff, int size, int *actual);



void putc_to_kstdout(char c);
char getc_from_kstdin();
void write_to_kstdout(const char *buff, int size, int *actual);

#endif//__KERNEL_KSTDIO_H_